<extend name="Index/index" />
<block name="head">
<style type="text/css">
    #pages a,#pages span{
        background-color: #fff;
        border: 1px solid #ddd;
        color: #337ab7;
        float: left;
        line-height: 1.42857;
        margin-left: -1px;
        padding: 6px 12px;
        position: relative;
        text-decoration: none;
    }
    #pages span{
        background:#337ab7;
        color:white;
    }
</style>
</block>
<block name="center">

<div class="portlet-body" style="height:100%;">
    <div class="note note-info" style="height:50px;line-height:50px;margin:0px;">
        <h4 class="box-heading">规则列表</h4>
    </div>
    <form method="get" action="{:U('Admin/Roles/index')}">
        <div class="row">
            <div style="width:200px" class="col-md-5">
                <div id="example1_length" class="dataTables_length" style="margin-top:20px;">
                    <label>
                        <div style="float:left;margin:0 10px;">显示</div>
                        <div style="float:left;"> 
                        <select class="form-control input-sm" aria-controls="example1" name="num">
                            <option value="10" <if condition="$_GET['num'] eq 10">selected  </if>>10</option>
                            <option value="25" <if condition="$_GET['num'] eq 25">selected  </if>>25</option>
                            <option value="50" <if condition="$_GET['num'] eq 50">selected  </if>>50</option>
                        </select> 
                        </div>
                        <div style="float:left;margin:0 10px;">条</div>
                    </label>
                </div>

            </div>
            <div class="col-md-4">
                <div style="width:600px;margin-top:20px;" class="input-group input-group-sm mbs">
                    <div style="float:left;margin-top:5px;margin-right:10px;" id="example1_length" class="dataTables_length">
                        <label>
                            规则中文名称:
                        </label>
                    </div>
                    <div style="float:left;width:300px;">
                        <input type="text" style="width:150px;" name="keywords" aria-controls="example1" placeholder="" class="form-control input-sm" value="{:empty($_GET['keywords'])? '' :$_GET['keywords']}">
                        <span class="input-group-btn">
                            <button style="margin-left:10px;" class="btn btn-success dropdown-toggle">搜索</button>
                            
                        </span>
                    </div>
                   
                </div>
            </div>
            <div class="col-md-3">
                <div class="dataTables_filter" id="example1_filter">
                    <label>
                        
                    </label>
                </div>
            </div>
        </div>
    </form>
    <table id="example-export" class="table table-hover table-striped table-bordered table-advanced tablesorter mbn">
        <thead>
            <tr>
                <th width="5%">ID</th>
                <th width="15%">规则唯一标识</th>
                <th width="20%">规则中文名称</th>
                <th width="20%">状态</th>
                <th width="20%">认证方式</th>
                <th width="11%">操作</th>

            </tr>
        </thead>
        <tbody>
            <foreach name="info" item="vo">

            <tr>
                <td>{$vo['id']}</td>
                <td>{$vo['name']}</td>
                <td>{$vo['title']}</td>
                <td><if condition="$vo['status'] eq 1 ">正常    <else /> 禁用</if></td>
                <td><if condition="$vo['type'] eq 1 ">实时认证    <else /> 登录认证</if></td>
                <td>
                    <a href="{:U('Admin/Roles/edit',array('id'=>$vo['id']))}"><button type="button" class="btn btn-default btn-xs"><i class="fa fa-edit"></i>&nbsp; 修改</button></a>
                </td>
            </tr>
            </foreach>
          
        </tbody>

    </table>
   <div class="row">
                        <div class="col-md-6">
                            <div class="dataTables_length">
                            </div>
                        </div>
                        <div class="col-md-6" >
                            <div class="dataTables_paginate paging_simple_numbers" id="example1_paginate">
                                <ul class="pagination" style="margin-left:200px">
                                    <li class="paginate_button previous" aria-controls="example1" tabindex="0" id="example1_previous">
                                        <div id="pages">{$pages}</div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
</div>




</block>